package crazyboyfeng.autodroid.utils;

import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class GlobalContext extends Application {
	 private static GlobalContext globalContext = null;
	 private static int mTheme = 0; 
	    @Override
	    public void onCreate() {
	        super.onCreate();
	        globalContext = this;

	    }
	    
	    public static GlobalContext getInstance() {
	        return globalContext;
	    }
	    
	    public void setTheme(int Theme){
	    	this.mTheme = Theme;
	    }
	    
	    public int getThemes(){
	    	return mTheme;
	    }
	    
	    //检查消息设置
	    public boolean checkNotificationSetting(){
	    	SharedPreferences myPrefs = PreferenceManager.getDefaultSharedPreferences(this);
	        Boolean state = myPrefs.getBoolean("notification_key", true);

	    	return state;
	    }
}
